<?php
session_start();
$user = isset($_SESSION["user"])?$_SESSION["user"]:null;

if(!$user){
    echo "未登录，请先去<a href='login.html'>登录</a>";
}else{
    echo "<!DOCTYPE html>";
    echo "<html>";
?>

    <head>
        <meta http-equiv="content-type" content="text/html;charset=UTF-8" />  
        <title>第一个网页</title>
    </head>
<body>
<h3>新添文章</h3>
  <form action="article_add_do.php" method="post">
    <div>
        <label>标题</label>
        <input type="text" name="Title" id="Title">
    </div>
    <div>
        <label>内容</label>
        <textarea name="Content" id="Content" cols="80" rows="20"></textarea>
    </div>
    <div>
        <label>作者</label>
        <span>
            <?=$user["Username"]?>
        </span>
    </div>
    <div>
    <input type="reset"  value="重置" ./>
     <input type="submit"  value="提交" ./>
    </div>
  </form>
</body>
</html>

<?php } ?>